/*
 * UPBodies.java
 *
 * Created on 2010-06-13, 22:02:12
 */

package JET.UtilPanels;

import JET.Centers.ControlCenter;
import JET.Centers.Graphics.GUICenter;
import JET.MouseStuff.MouseMode;
import JET.MouseStuff.MouseSubMode;
import JET.MouseStuff.Tasks.CreateCircleTask;
import JET.MouseStuff.Tasks.CreateSquarenetTask;
import JET.mygui.UtilTabsPane.UtilTabsPaneTab;

/**
 *
 * @author 057Ry
 */
public class UPBodies extends javax.swing.JPanel implements UtilTabsPaneTab {
    static final ControlCenter CC = ControlCenter.getInstance();

    /** Creates new form UPBodies */
    public UPBodies() {
        initComponents();
    }

    public GUICenter.UtilTabs getId() {
        return GUICenter.UtilTabs.Bodies;
    }

    public boolean isScrollable() {
        return false;
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jButton23 = new javax.swing.JButton();
        jButton26 = new javax.swing.JButton();
        jButton24 = new javax.swing.JButton();
        jButton25 = new javax.swing.JButton();
        jButton27 = new javax.swing.JButton();

        setMinimumSize(new java.awt.Dimension(0, 0));
        setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 0, 0));

        jButton23.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/Body - squarenet - doublesprings.PNG"))); // NOI18N
        jButton23.setText("jButton2");
        jButton23.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton23.setPreferredSize(new java.awt.Dimension(37, 37));
        jButton23.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton23ActionPerformed(evt);
            }
        });
        add(jButton23);

        jButton26.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/Body - okrag - center point.PNG"))); // NOI18N
        jButton26.setText("jButton4");
        jButton26.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton26.setPreferredSize(new java.awt.Dimension(37, 37));
        jButton26.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton26ActionPerformed(evt);
            }
        });
        add(jButton26);

        jButton24.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/Body - squarenet.PNG"))); // NOI18N
        jButton24.setText("jButton1");
        jButton24.setAlignmentX(0.5F);
        jButton24.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton24.setPreferredSize(new java.awt.Dimension(37, 37));
        jButton24.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton24ActionPerformed(evt);
            }
        });
        add(jButton24);

        jButton25.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/Body - okrag - double springs.PNG"))); // NOI18N
        jButton25.setText("jButton5");
        jButton25.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton25.setPreferredSize(new java.awt.Dimension(37, 37));
        jButton25.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton25ActionPerformed(evt);
            }
        });
        add(jButton25);

        jButton27.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JET/Images/Body - okrag - pojedyncze sprezyny 2.PNG"))); // NOI18N
        jButton27.setText("jButton3");
        jButton27.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton27.setPreferredSize(new java.awt.Dimension(37, 37));
        jButton27.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton27ActionPerformed(evt);
            }
        });
        add(jButton27);

        getAccessibleContext().setAccessibleName("Bodies");
    }// </editor-fold>//GEN-END:initComponents

    private void jButton23ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton23ActionPerformed
//        CC.MC.setMouseMode( MouseMode.CREATE_SQUARENET );
//        CC.MC.setMouseSubMode( MouseSubMode.FIND_FIRST_OBJECT );
//        //CC.MC.mouseInteger = CREATE_SQUARENET_START_COLLUMNS_NUMBER;
//        CC.MC.createSquareNetDoubleSprings = true;
//        CC.GUIC.repaintAllSceneTabs();

        CC.MC.getMouseModeSequence().clear();
        CC.MC.getMouseModeSequence().addTask( new CreateSquarenetTask());
        CC.MC.createSquareNetDoubleSprings = true;
        CC.MC.getMouseModeSequence().begin();
        CC.GUIC.repaintAllSceneTabs();

}//GEN-LAST:event_jButton23ActionPerformed

    private void jButton26ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton26ActionPerformed
//        CC.MC.setMouseMode( MouseMode.CREATE_CIRCLE );
//        CC.MC.setMouseSubMode( MouseSubMode.FIND_FIRST_OBJECT );
//        //CC.MC.mouseInteger = CREATE_CIRCLE_START_MASS2D_NUMBER;
//        CC.MC.createCircleCenterPoint = true;
//        CC.MC.createCircleDoubleSprings = false;
//        CC.GUIC.repaintAllSceneTabs();

        CC.MC.getMouseModeSequence().clear();
        CC.MC.getMouseModeSequence().addTask( new CreateCircleTask());
        CC.MC.createCircleCenterPoint = true;
        CC.MC.createCircleDoubleSprings = false;
        CC.MC.getMouseModeSequence().begin();
        CC.GUIC.repaintAllSceneTabs();

}//GEN-LAST:event_jButton26ActionPerformed

    private void jButton24ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton24ActionPerformed
//        CC.MC.setMouseMode( MouseMode.CREATE_SQUARENET );
//        CC.MC.setMouseSubMode( MouseSubMode.FIND_FIRST_OBJECT );
//        //CC.MC.mouseInteger = CREATE_SQUARENET_START_COLLUMNS_NUMBER;
//        CC.MC.createSquareNetDoubleSprings = false;
//        CC.GUIC.repaintAllSceneTabs();

        CC.MC.getMouseModeSequence().clear();
        CC.MC.getMouseModeSequence().addTask( new CreateSquarenetTask());
        CC.MC.createSquareNetDoubleSprings = false;
        CC.MC.getMouseModeSequence().begin();
        CC.GUIC.repaintAllSceneTabs();

}//GEN-LAST:event_jButton24ActionPerformed

    private void jButton25ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton25ActionPerformed
//        CC.MC.setMouseMode( MouseMode.CREATE_CIRCLE );
//        CC.MC.setMouseSubMode( MouseSubMode.FIND_FIRST_OBJECT );
//        //CC.MC.mouseInteger = CREATE_CIRCLE_START_MASS2D_NUMBER;
//        CC.MC.createCircleCenterPoint = true;
//        CC.MC.createCircleDoubleSprings = true;
//        CC.GUIC.repaintAllSceneTabs();

        CC.MC.getMouseModeSequence().clear();
        CC.MC.getMouseModeSequence().addTask( new CreateCircleTask());
        CC.MC.createCircleCenterPoint = true;
        CC.MC.createCircleDoubleSprings = true;
        CC.MC.getMouseModeSequence().begin();
        CC.GUIC.repaintAllSceneTabs();
}//GEN-LAST:event_jButton25ActionPerformed

    private void jButton27ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton27ActionPerformed
//        CC.MC.setMouseMode( MouseMode.CREATE_CIRCLE );
//        CC.MC.setMouseSubMode( MouseSubMode.FIND_FIRST_OBJECT );
//        //CC.MC.mouseInteger = CREATE_CIRCLE_START_MASS2D_NUMBER;
//        CC.MC.createCircleCenterPoint = false;
//        CC.MC.createCircleDoubleSprings = false;
//        CC.GUIC.repaintAllSceneTabs();

        CC.MC.getMouseModeSequence().clear();
        CC.MC.getMouseModeSequence().addTask( new CreateCircleTask());
        CC.MC.createCircleCenterPoint = false;
        CC.MC.createCircleDoubleSprings = false;
        CC.MC.getMouseModeSequence().begin();
        CC.GUIC.repaintAllSceneTabs();
}//GEN-LAST:event_jButton27ActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton23;
    private javax.swing.JButton jButton24;
    private javax.swing.JButton jButton25;
    private javax.swing.JButton jButton26;
    private javax.swing.JButton jButton27;
    // End of variables declaration//GEN-END:variables

}
